﻿@{
    Layout = "~/Views/Shared/UserPageLayout.cshtml";
    DLULearningNetworkModel.Account accountOwner = ViewBag.AccountOwner as DLULearningNetworkModel.Account;
    DLULearningNetworkModel.Account curUser = ViewBag.CurUser as DLULearningNetworkModel.Account;
}
@section cssjs{
    <link href="@Url.Content("~/Content/TableStyle.css")"rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/Pagination.css")"rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        $(function () {
            $("ul.pager li a").live('click', function () {
                GetListFriend($(this).attr("page"));
                return false;
            });
        })
        function GetListFriend(page) {
            var nickname = $("#tableData").attr("nickname");
            $.post("/UserPage/FriendList", {'nickname': nickname ,'page': page }, function (data) {
                $("#tableData").html(data);
            })
        }
    </script>
   
}

@section userPageMenu{
    @Html.Partial("UserPageMenu", accountOwner)
}
@section leftContent{
    <h3>
        Các bạn của @accountOwner.LastName_s @accountOwner.FirstName_s</h3>
    @{
        if (ViewBag.ShowFriendList)
        {
        <div id="tableData" nickname="@accountOwner.Nickname_s">
            @Html.Partial("PartialListFriend", ViewBag.ListFriend as List<DLULearningNetworkModel.Friend>)
        </div>
        }
        else
        {
        <span>@accountOwner.LastName_s @accountOwner.FirstName_s không chia sẻ danh sách bạn bè</span>
        }
    }
}
@section rightBox{
}
